/**
 * User: yd
 * Date: 2019/5/24
 * Time: 15:38
 **/
const path = require('path');
function resolve(dir) {
	return path.join(__dirname, dir);
}
module.exports = {
	configureWebpack: {
		resolve: {
			alias: {
				'@src': resolve('src'),
				'@assets': resolve('src/assets'),
				'@components': resolve('src/components'),
				'@router': resolve('src/router'),
				'@store': resolve('src/store'),
				'@views': resolve('src/views')
			}
		}
	},
	devServer: {
		//根据环境配置相关代理
		//open: true,
		proxy: {
			'/api': {
				target:'http://localhost:8080', // 你请求的第三方接口
				changeOrigin:true,
				pathRewrite:{
					'^/api': '/api'
				}
			}
		}
	},
};